<template>
    <div v-loading="loading">
        <el-form ref="form" :disabled="view" :model="form" :rules="rules" label-width="100px" label-suffix="：">
            <el-table
                ref="multipleTable"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%;"
                @selection-change="handleSelectionChange"
            >
                <el-table-column
                    type="selection"
                    width="55"
                />
                <el-table-column
                    label="商品ID"
                    width="100"
                >
                    <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column
                    prop="name"
                    label="名称"
                    width="100"
                />
                <el-table-column
                    prop="address"
                    label="分类"
                    show-overflow-tooltip
                />
                <el-table-column
                    prop="address"
                    label="销售价"
                    show-overflow-tooltip
                />
                <el-table-column
                    prop="address"
                    label="店铺"
                    show-overflow-tooltip
                />
            </el-table>
        </el-form>
        <div v-if="show == 1" slot="footer" align="right">
            <el-button>取 消</el-button>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        id: {
            type: [Number, String],
            default: ''
        },
        view: {
            type: Boolean,
            default: false
        }
    },
    data() {
        return {
            // 路由
            show: 0,
            loading: false,
            categoryOptions: [],
            form: {
                id: this.id,
                pid: null,
                name: '',
                normal_rate: '',
                self_rate: '',
                cover: '',
                weigh: '',
                status: 1
            }
        }
    },
    mounted() {
        // 编辑
        if (this.form.id != '') {
            this.getInfo()
        }
    },
    methods: {
        // addLive() {
        //     if (!this.isShow) {
        //         this.isShow = true
        //         console.log(this.isShow)
        //     } else {
        //         this.isShow = false
        //         console.log(this.isShow)
        //     }
        // },
    }
}
</script>

<style lang="scss" scoped>
    // scss
    .elform {
        width: 650px;
    }
</style>
